home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / c1tutor.exe / SPECIAL.C < prev    next >
C/C++ Source or Header  |  1987-07-04  |  810b  |  29 lines

  1.                                         /* Chapter 9 - Program 7 */
  2. #include "stdio.h"
  3.  
  4. main()
  5. {
  6. int index;
  7.  
  8.    for (index = 0;index < 6;index++) {
  9.       printf("This line goes to the standard output.\n");
  10.       fprintf(stderr,"This line goes to the error device.\n");
  11.    }
  12.  
  13.    exit(4);  /* This can be tested with the DOS errorlevel
  14.                 command in a batch file. The number returned
  15.                 is used as follows;
  16.  
  17.                 IF ERRORLEVEL 4 GOTO FOUR
  18.                 (continue here if less than 4)
  19.                 .
  20.                 .
  21.                 GOTO DONE
  22.                 :FOUR
  23.                 (continue here if 4 or greater)
  24.                 .
  25.                 .
  26.                 :DONE
  27.                                                                   */
  28. }
  29.